*STATA 15.1
cd "C:\Users\gnv85086\Documents\Backup of Harddrive\garrettvandekamp\Dissertation\Independence Theories\JLC Submission\Accept\Replication File"
ssc install combomarginsplot

use "paper data new and improved part 7.dta"

*Additive models
heckprob strike c.courtattitudenat popaveragerelativelag c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.popaveragerelativelag i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   billslaglinear c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.billslaglinear i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   c.lengthlinear c.publicattitudelag jronetwo b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal lengthlinear b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   c.earlysalienceest c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2009 & year>1954, sel(challenge=c.timechal##c.timechal##c.timechal b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum) 
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   FloorMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal FloorMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   FiliMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal FiliMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   PartyMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal PartyMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat  c.partyvotecon c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.partyvotecon b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenat   divided c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal divided b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

*Multiplicative models done
heckprob strike c.courtattitudenat##c.popaveragerelativelag c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal popaveragerelativelag i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(popaveragerelativelag=(.05(.05).55)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(popaveragerelativelag=(.05)) predict(pcond) level(90) saving(Protection1, replace)
margins, dydx(courtattitudenat) at(popaveragerelativelag=(.55)) predict(pcond) level(90) saving(Protection2, replace)

heckprob strike c.courtattitudenat##c.billslaglinear c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.billslaglinear i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(billslaglinear=(0 31)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(billslaglinear=(0)) predict(pcond) level(90) saving(Protection3, replace)
margins, dydx(courtattitudenat) at(billslaglinear=(31)) predict(pcond) level(90) saving(Protection4, replace)

heckprob strike c.courtattitudenat##c.lengthlinear   c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable  if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.lengthlinear b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(lengthlinear=(0 1302)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(lengthlinear=(0)) predict(pcond) level(90) saving(Protection5, replace)
margins, dydx(courtattitudenat) at(lengthlinear=(1302)) predict(pcond) level(90) saving(Protection6, replace)

heckprob strike c.courtattitudenat##c.earlysalienceest c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2009 & year>1954, sel(challenge=c.timechal##c.timechal##c.timechal b17.StatuteAreaTractable b4.chiefyear ) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(earlysalienceest=(-1 2)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(earlysalienceest=(-1)) predict(pcond) level(90) saving(Protection7, replace)
margins, dydx(courtattitudenat) at(earlysalienceest=(2)) predict(pcond) level(90) saving(Protection8, replace)

combomarginsplot "Protection1" "Protection2" "Protection3" "Protection4" ///
"Protection5" "Protection6" "Protection7" "Protection8", ///
ylin(0) recast(scatter) plotr(margin(large)) scheme(s1mono) ylabel(,grid) ///
ytitle("Predicted Probability of Invalidation", size(medium) margin(medsmall)) ///
xtitle("{bf:Popularity                   Court-Curbing Bills                   Statute Length                   Salience}", size(medsmall) margin(tiny))  ///
xlabel(1 `" " " "Not Independent" "' 2 `" "Independent" "" "' ///
3 `" " " "Not Independent" "' 4 `" "Independent" "" "' ///
5 `" " " "Not Independent" "' 6 `" "Independent" "" "' ///
7 `" " " "Not Independent" "' 8 `" "Independent" "" "') ///
title("") ylabel(-1(.25)1) yscale(range(0 1))
gr_edit .style.editstyle declared_xsize(8) editcopy
graph save "Protection Graphic 1.gph", replace

heckprob strike c.courtattitudenat##c.FloorMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.FloorMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(FloorMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(FloorMedOppCSFullmax=(0)) predict(pcond) level(90) saving(Protection9, replace)
margins, dydx(courtattitudenat) at(FloorMedOppCSFullmax=(1)) predict(pcond) level(90) saving(Protection10, replace)

heckprob strike c.courtattitudenat##c.FiliMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.FiliMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(FiliMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(FiliMedOppCSFullmax=(0)) predict(pcond) level(90) saving(Protection11, replace)
margins, dydx(courtattitudenat) at(FiliMedOppCSFullmax=(1)) predict(pcond) level(90) saving(Protection12, replace)

heckprob strike c.courtattitudenat##c.PartyMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.PartyMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(PartyMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(PartyMedOppCSFullmax=(0)) predict(pcond) level(90) saving(Protection13, replace)
margins, dydx(courtattitudenat) at(PartyMedOppCSFullmax=(1)) predict(pcond) level(90) saving(Protection14, replace)

heckprob strike c.courtattitudenat##c.partyvotecon c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.partyvotecon b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(partyvotecon=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(partyvotecon=(0)) predict(pcond) level(90) saving(Protection15, replace)
margins, dydx(courtattitudenat) at(partyvotecon=(1)) predict(pcond) level(90) saving(Protection16, replace)

heckprob strike c.courtattitudenat##i.divided c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal i.divided b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenat) at(divided=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenat) at(divided=(0)) predict(pcond) level(90) saving(Protection17, replace)
margins, dydx(courtattitudenat) at(divided=(1)) predict(pcond) level(90) saving(Protection18, replace)

combomarginsplot "Protection9" "Protection10" "Protection11" "Protection12" ///
"Protection13" "Protection14" "Protection15" "Protection16" ///
"Protection17" "Protection18", ///
ylin(0) recast(scatter) plotr(margin(large)) scheme(s1mono) ylabel(,grid) ///
ytitle("Predicted Probability of Invalidation", size(medium) margin(medsmall)) ///
xtitle("{bf:Floor Median          Senate Filibuster          Party Gatekeeping          Partisan Vote          Fragmentation}", size(medsmall) margin(tiny))  ///
xlabel(1 `" " " "Not Independent" "' 2 `" "Independent" "" "' ///
3 `" " " "Not Independent" "' 4 `" "Independent" "" "' ///
5 `" " " "Not Independent" "' 6 `" "Independent" "" "' ///
7 `" " " "Not Independent" "' 8 `" "Independent" "" "' ///
9 `" " " "Not Independent" "' 10 `" "Independent" "" "') ///
title("") ylabel(-1(.25)1) yscale(range(0 1))
gr_edit .style.editstyle declared_xsize(8) editcopy
graph save "Protection Graphic 2.gph", replace

*Descriptive Statistics
sum challenge timechal FloorMedOppCSFullmax FiliMedOppCSFullmax PartyMedOppCSFullmax courtattitudestatuteideostd publicattitudelagstatuteideostd if year<2012 
sum popaveragerelativelag billslaglinear divided if year<2012 & publiclawnum==81171
sum lengthlinear partyvotecon  if year<2012 & enyear==year & duplicate==0
sum strike courtattitudenat courtattitudenatSC publicattitudelag jronetwo if year<2012 

*Factoring
factor popaveragerelativelag billslaglinear lengthlinear PartyMedOppCSFullmax partyvotecon divided
screeplot, scheme(s1color) xaxis (1 2) yaxis (1 2) ylabel(, axis(1) nogrid) ylabel(, axis(2) nolabel)  xlabel(, axis(2) nolabel) xsize(4) xtitle("", axis(2)) ytitle("", axis(2))



*Segal-Cover Check, Additive Models
heckprob strike c.courtattitudenatSC c.popaveragerelativelag   c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.popaveragerelativelag i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.billslaglinear c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.billslaglinear i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.lengthlinear   c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable  if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.lengthlinear b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.earlysalienceest c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2009 & year>1954, sel(challenge=c.timechal##c.timechal##c.timechal b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.FloorMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.FloorMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.FiliMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.FiliMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.PartyMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.PartyMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC c.partyvotecon c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.partyvotecon b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudenatSC i.divided c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal i.divided b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)

*Segal-Cover Check, Multiplicative Models
heckprob strike c.courtattitudenatSC##c.popaveragerelativelag   c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.popaveragerelativelag i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(popaveragerelativelag=(.05(.05).55)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(popaveragerelativelag=(.05)) predict(pcond) level(90) saving(AProtection1, replace)
margins, dydx(courtattitudenatSC) at(popaveragerelativelag=(.55)) predict(pcond) level(90) saving(AProtection2, replace)

heckprob strike c.courtattitudenatSC##c.billslaglinear c.publicattitudelag jronetwo  i.chiefSCDB b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal c.billslaglinear i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(billslaglinear=(0 31)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(billslaglinear=(0)) predict(pcond) level(90) saving(AProtection3, replace)
margins, dydx(courtattitudenatSC) at(billslaglinear=(31)) predict(pcond) level(90) saving(AProtection4, replace)

heckprob strike c.courtattitudenatSC##c.lengthlinear   c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable  if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.lengthlinear b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(lengthlinear=(0 1302)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(lengthlinear=(0)) predict(pcond) level(90) saving(AProtection5, replace)
margins, dydx(courtattitudenatSC) at(lengthlinear=(1302)) predict(pcond) level(90) saving(AProtection6, replace)

heckprob strike c.courtattitudenatSC##c.earlysalienceest c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2009 & year>1954, sel(challenge=c.timechal##c.timechal##c.timechal b17.StatuteAreaTractable b4.chiefyear ) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(earlysalienceest=(-1 2)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(earlysalienceest=(-1)) predict(pcond) level(90) saving(AProtection7, replace)
margins, dydx(courtattitudenatSC) at(earlysalienceest=(2)) predict(pcond) level(90) saving(AProtection8, replace)

combomarginsplot "AProtection1" "AProtection2" "AProtection3" "AProtection4" ///
"AProtection5" "AProtection6" "AProtection7" "AProtection8", ///
ylin(0) recast(scatter) plotr(margin(large)) scheme(s1mono) ylabel(,grid) ///
ytitle("Predicted Probability of Invalidation", size(medium) margin(medsmall)) ///
xtitle("{bf:Popularity                   Court-Curbing Bills                   Statute Length                   Salience}", size(medsmall) margin(tiny))  ///
xlabel(1 `" " " "Not Independent" "' 2 `" "Independent" "" "' ///
3 `" " " "Not Independent" "' 4 `" "Independent" "" "' ///
5 `" " " "Not Independent" "' 6 `" "Independent" "" "' ///
7 `" " " "Not Independent" "' 8 `" "Independent" "" "') ///
title("") ylabel(-1(.25)1) yscale(range(0 1))
gr_edit .style.editstyle declared_xsize(8) editcopy
graph save "AProtection Graphic 1.gph", replace


heckprob strike c.courtattitudenatSC##c.FloorMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.FloorMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(FloorMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(FloorMedOppCSFullmax=(0)) predict(pcond) level(90) saving(AProtection9, replace)
margins, dydx(courtattitudenatSC) at(FloorMedOppCSFullmax=(1)) predict(pcond) level(90) saving(AProtection10, replace)

heckprob strike c.courtattitudenatSC##c.FiliMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.FiliMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(FiliMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(FiliMedOppCSFullmax=(0)) predict(pcond) level(90) saving(AProtection11, replace)
margins, dydx(courtattitudenatSC) at(FiliMedOppCSFullmax=(1)) predict(pcond) level(90) saving(AProtection12, replace)

heckprob strike c.courtattitudenatSC##c.PartyMedOppCSFullmax c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.PartyMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(PartyMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(PartyMedOppCSFullmax=(0)) predict(pcond) level(90) saving(AProtection13, replace)
margins, dydx(courtattitudenatSC) at(PartyMedOppCSFullmax=(1)) predict(pcond) level(90) saving(AProtection14, replace)

heckprob strike c.courtattitudenatSC##c.partyvotecon c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal c.partyvotecon b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(partyvotecon=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(partyvotecon=(0)) predict(pcond) level(90) saving(AProtection15, replace)
margins, dydx(courtattitudenatSC) at(partyvotecon=(1)) predict(pcond) level(90) saving(AProtection16, replace)

heckprob strike c.courtattitudenatSC##i.divided c.publicattitudelag jronetwo  b4.chiefSCDB b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal i.divided b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefSCDB, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudenatSC) at(divided=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudenatSC) at(divided=(0)) predict(pcond) level(90) saving(AProtection17, replace)
margins, dydx(courtattitudenatSC) at(divided=(1)) predict(pcond) level(90) saving(AProtection18, replace)

combomarginsplot "AProtection9" "AProtection10" "AProtection11" "AProtection12" ///
"AProtection13" "AProtection14" "AProtection15" "AProtection16" ///
"AProtection17" "AProtection18", ///
ylin(0) recast(scatter) plotr(margin(large)) scheme(s1mono) ylabel(,grid) ///
ytitle("Predicted Probability of Invalidation", size(medium) margin(medsmall)) ///
xtitle("{bf:Floor Median          Senate Filibuster          Party Gatekeeping          Partisan Vote          Fragmentation}", size(medsmall) margin(tiny))  ///
xlabel(1 `" " " "Not Independent" "' 2 `" "Independent" "" "' ///
3 `" " " "Not Independent" "' 4 `" "Independent" "" "' ///
5 `" " " "Not Independent" "' 6 `" "Independent" "" "' ///
7 `" " " "Not Independent" "' 8 `" "Independent" "" "' ///
9 `" " " "Not Independent" "' 10 `" "Independent" "" "') ///
title("") ylabel(-1(.25)1) yscale(range(0 1))
gr_edit .style.editstyle declared_xsize(8) editcopy
graph save "AProtection Graphic 2.gph", replace


*Statute Ideology and Complex Hazard Function
heckprob strike c.courtattitudestatuteideostd c.popaveragerelativelag   c.publicattitudelagstatuteideostd jronetwo  i.chiefyear b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal c.popaveragerelativelag  c.courtattitudestatuteideostd publicattitudelagstatuteideostd i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudestatuteideostd c.billslaglinear c.publicattitudelagstatuteideostd jronetwo  i.chiefyear b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal c.billslaglinear  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudestatuteideostd c.lengthlinear   c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable  if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal c.lengthlinear  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudestatuteideostd c.earlysalienceest c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2009 & year>1954, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudestatuteideostd c.FloorMedOppCSFullmax c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd c.FloorMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudestatuteideostd c.FiliMedOppCSFullmax c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd c.FiliMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)


heckprob strike c.courtattitudestatuteideostd c.PartyMedOppCSFullmax c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd c.PartyMedOppCSFullmax b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)


heckprob strike c.courtattitudestatuteideostd c.partyvotecon c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd c.partyvotecon b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)

heckprob strike c.courtattitudestatuteideostd i.divided c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd i.divided b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)


*Statute Ideology and Complex Hazard Functions, Multiplicative Models
heckprob strike c.courtattitudestatuteideostd##c.popaveragerelativelag   c.publicattitudelagstatuteideostd jronetwo  i.chiefyear b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.popaveragerelativelag c.publicattitudelagstatuteideostd i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(popaveragerelativelag=(.05(.05).55)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(popaveragerelativelag=(.05)) predict(pcond) level(90) saving(A2Protection1, replace)
margins, dydx(courtattitudestatuteideostd) at(popaveragerelativelag=(.55)) predict(pcond) level(90) saving(A2Protection2, replace)

heckprob strike c.courtattitudestatuteideostd##c.billslaglinear c.publicattitudelagstatuteideostd jronetwo  i.chiefyear b17.StatuteAreaTractable if year<2012 & year>1972, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.billslaglinear c.publicattitudelagstatuteideostd i.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(billslaglinear=(0 31)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(billslaglinear=(0)) predict(pcond) level(90) saving(A2Protection3, replace)
margins, dydx(courtattitudestatuteideostd) at(billslaglinear=(31)) predict(pcond) level(90) saving(A2Protection4, replace)

heckprob strike c.courtattitudestatuteideostd##c.lengthlinear   c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable  if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.lengthlinear c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(lengthlinear=(0 1302)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(lengthlinear=(0)) predict(pcond) level(90) saving(A2Protection5, replace)
margins, dydx(courtattitudestatuteideostd) at(lengthlinear=(1302)) predict(pcond) level(90) saving(A2Protection6, replace)

heckprob strike c.courtattitudestatuteideostd##c.earlysalienceest c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2009 & year>1954, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd c.publicattitudelagstatuteideostd b17.StatuteAreaTractable b4.chiefyear ) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(earlysalienceest=(-1 2)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(earlysalienceest=(-1)) predict(pcond) level(90) saving(A2Protection7, replace)
margins, dydx(courtattitudestatuteideostd) at(earlysalienceest=(2)) predict(pcond) level(90) saving(A2Protection8, replace)

combomarginsplot "A2Protection1" "A2Protection2" "A2Protection3" "A2Protection4" ///
"A2Protection5" "A2Protection6" "A2Protection7" "A2Protection8", ///
ylin(0) recast(scatter) plotr(margin(large)) scheme(s1mono) ylabel(,grid) ///
ytitle("Predicted Probability of Invalidation", size(medium) margin(medsmall)) ///
xtitle("{bf:Popularity                   Court-Curbing Bills                   Statute Length                   Salience}", size(medsmall) margin(tiny))  ///
xlabel(1 `" " " "Not Independent" "' 2 `" "Independent" "" "' ///
3 `" " " "Not Independent" "' 4 `" "Independent" "" "' ///
5 `" " " "Not Independent" "' 6 `" "Independent" "" "' ///
7 `" " " "Not Independent" "' 8 `" "Independent" "" "') ///
title("") ylabel(-1(.25)1) yscale(range(0 1))
gr_edit .style.editstyle declared_xsize(8) editcopy
graph save "A2Protection Graphic 1.gph", replace


heckprob strike c.courtattitudestatuteideostd##c.FloorMedOppCSFullmax c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.FloorMedOppCSFullmax c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(FloorMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(FloorMedOppCSFullmax=(0)) predict(pcond) level(90) saving(A2Protection9, replace)
margins, dydx(courtattitudestatuteideostd) at(FloorMedOppCSFullmax=(1)) predict(pcond) level(90) saving(A2Protection10, replace)

heckprob strike c.courtattitudestatuteideostd##c.FiliMedOppCSFullmax c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.FiliMedOppCSFullmax  c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(FiliMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(FiliMedOppCSFullmax=(0)) predict(pcond) level(90) saving(A2Protection11, replace)
margins, dydx(courtattitudestatuteideostd) at(FiliMedOppCSFullmax=(1)) predict(pcond) level(90) saving(A2Protection12, replace)

heckprob strike c.courtattitudestatuteideostd##c.PartyMedOppCSFullmax c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.PartyMedOppCSFullmax c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(PartyMedOppCSFullmax=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(PartyMedOppCSFullmax=(0)) predict(pcond) level(90) saving(A2Protection13, replace)
margins, dydx(courtattitudestatuteideostd) at(PartyMedOppCSFullmax=(1)) predict(pcond) level(90) saving(A2Protection14, replace)

heckprob strike c.courtattitudestatuteideostd##c.partyvotecon c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##c.partyvotecon c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(partyvotecon=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(partyvotecon=(0)) predict(pcond) level(90) saving(A2Protection15, replace)
margins, dydx(courtattitudestatuteideostd) at(partyvotecon=(1)) predict(pcond) level(90) saving(A2Protection16, replace)

heckprob strike c.courtattitudestatuteideostd##i.divided c.publicattitudelagstatuteideostd jronetwo  b4.chiefyear b17.StatuteAreaTractable if year<2012, sel(challenge=c.timechal##c.timechal##c.timechal##i.prevchal  c.courtattitudestatuteideostd##i.divided c.publicattitudelagstatuteideostd b4.chiefyear b17.StatuteAreaTractable) vce(cluster publiclawnum)
testparm i.chiefyear, eq(strike)
testparm i.chiefyear, eq(challenge)
testparm b17.StatuteAreaTractable, eq(strike)
testparm b17.StatuteAreaTractable, eq(challenge)
testparm c.timechal c.timechal#c.timechal c.timechal#c.timechal#c.timechal, eq(challenge)
testparm 1.prevchal 1.prevchal#c.timechal 1.prevchal#c.timechal#c.timechal 1.prevchal#c.timechal#c.timechal#c.timechal, eq(challenge)
margins, dydx(courtattitudestatuteideostd) at(divided=(0 1)) predict(pcond) level(90)
margins, dydx(courtattitudestatuteideostd) at(divided=(0)) predict(pcond) level(90) saving(A2Protection17, replace)
margins, dydx(courtattitudestatuteideostd) at(divided=(1)) predict(pcond) level(90) saving(A2Protection18, replace)

combomarginsplot "A2Protection9" "A2Protection10" "A2Protection11" "A2Protection12" ///
"A2Protection13" "A2Protection14" "A2Protection15" "A2Protection16" ///
"A2Protection17" "A2Protection18", ///
ylin(0) recast(scatter) plotr(margin(large)) scheme(s1mono) ylabel(,grid) ///
ytitle("Predicted Probability of Invalidation", size(medium) margin(medsmall)) ///
xtitle("{bf:Floor Median          Senate Filibuster          Party Gatekeeping          Partisan Vote          Fragmentation}", size(medsmall) margin(tiny))  ///
xlabel(1 `" " " "Not Independent" "' 2 `" "Independent" "" "' ///
3 `" " " "Not Independent" "' 4 `" "Independent" "" "' ///
5 `" " " "Not Independent" "' 6 `" "Independent" "" "' ///
7 `" " " "Not Independent" "' 8 `" "Independent" "" "' ///
9 `" " " "Not Independent" "' 10 `" "Independent" "" "') ///
title("") ylabel(-1(.25)1) yscale(range(0 1))
gr_edit .style.editstyle declared_xsize(8) editcopy
graph save "A2Protection Graphic 2.gph", replace

